<?php

namespace app\api\controller\v1;

use app\common\controller\BaseController;
use app\common\model\Blacklist as ModelBlacklist;
use app\common\validate\BlacklistValidate;

class Blacklist extends BaseController
{
    public function addBlack()
    {
        (new BlacklistValidate())->goCheck('addblack');
        (new ModelBlacklist())->addBlack();
        return $this->showResCodeWithOutData('加入黑名单成功');
    }
    // 移除黑名单
    public function removeBlack()
    {
        (new BlacklistValidate())->goCheck('addblack');
        (new ModelBlacklist())->removeBlack();
        return $this->showResCodeWithOutData('移除黑名单成功');
    }
}
